% MASTER & BACHELOR WORK DOCUMENT STYLE -- Released 27 May 1997
%    for LaTeX version 2.09
% Copyright (C) 1997 by Helen Panfilova

% *******************  PAGE FORMAT  *********************************

\topmargin=0pt
\textheight=595pt

\newfont{\bxsl}{cmbxsl10 at 12pt} % new font definition

\setcounter{secnumdepth}{4}   % depth of beginning section numbering

% *******************  LATVIAN HEADINGS DEFINITION  *****************

%\renewcommand{\partname}{Daļa}
%\renewcommand{\chaptername}{}

%\renewcommand{\contentsname}{Saturs}
%\renewcommand{\bibname}{Literatūras saraksts}
%\renewcommand{\listtablename}{Tabulu saraksts}
%\renewcommand{\listfigurename}{Ilustrāciju saraksts}
%\renewcommand{\indexname}{Priekšmetu rādītājs}
%\renewcommand{\figurename}{Zīm.}
%\renewcommand{\tablename}{Tabula}
%\renewcommand{\appendixname}{Pielikums}

% ******************  SECTION NUMBERING REDEFINITION  ***************



% *******************  NEW COMMANDS  ********************************

\newcommand{\mdots}{\ldots\ldots\ldots\ldots}

\def\upcase{\expandafter\makeupcase}
\def\makeupcase#1{\uppercase{#1}}

\def\univ#1{\gdef\@univ{#1}}
\def\univer#1{\gdef\@univer{#1}}
\def\fakul#1{\gdef\@fakul{#1}}
\def\komis#1{\gdef\@komis{#1}}

\def\nosaukums#1{\gdef\@nosaukums{#1}}
\def\darbatips#1{\gdef\@darbatips{#1}}
\def\autors#1{\gdef\@autors{#1}}
\def\vadvards#1{\gdef\@vadvards{#1}}
\def\vadinfo#1{\gdef\@vadinfo{#1}}
\def\gads#1{\gdef\@gads{#1}}

\def\students#1{\gdef\@students{#1}}
\def\apl_num#1{\gdef\@apl_num{#1}}

\def\recvards#1{\gdef\@recvards{#1}}
\def\recamats#1{\gdef\@recamats{#1}}

\def\metod#1{\gdef\@metod{#1}}

\def\sekretars#1{\gdef\@sekretars{#1}}

\def\datums#1{\gdef\@datums{#1}}
\def\aizstdatums#1{\gdef\@aizstdatums{#1}}

% \usepackage{textcase} 
% ******************  TITLEPAGE  ************************************
\usepackage{datetime}

\def\titullapa{\thispagestyle{empty} \@titullapa
              \let\titullapa\relax  % to avoid several titlepages
               \let\@titullapa\relax}

\def\@titullapa{
{\begin{center}
\Large

% \ldots \today{} \currenttime{} \ldots \\%
\MakeUppercase{\@univer}\\
\MakeUppercase{\@fakul\ fakultāte}

\vspace{4cm}

{\bfseries \MakeUppercase{\@nosaukums}}

\vspace{2cm}

\MakeUppercase{\@darbatips\ darbs}

\end{center}

\vspace{3cm}

\singlespacing
\noindent
\large
Autors: {\bfseries \@students} \\
Studenta apliecības Nr.: \@apl_num\ \\
Darba vadītājs: \@vadinfo\ \@vadvards\

\vfill

\begin{center}
\Large
RĪGA, \@gads
\end{center}
}
\onehalfspacing
}

% ******************  REGISTRATION PAGE  ****************************

\def\reglapa{\newpage \thispagestyle{empty} \@reglapa
             \let\reglapa\relax  % to avoid several reg.pages
             \let\@reglapa\relax }

\def\@reglapa{

\topmargin 1cm

\@darbatips\  darbs "\@nosaukums" izstrādāts \@univ\  \@fakul\  fakultātē.

\vspace{1cm}

Ar savu parakstu apliecinu, ka pētījums veikts patstāvīgi, izmantoti tikai tajā norādītie informācijas avoti un iesniegtā darba elektroniskā kopija atbilst izdrukai.

Autors: \mdots ~ \@students

\vspace{2cm}
Rekomendēju/nerekomendēju darbu aizstāvēšanai

Vadītājs: \@vadinfo\  \@vadvards\  \mdots ~ \@datums

\vspace{1.5cm}

\noindent
Recenzents: \@recamats\  \@recvards

\vspace{1.5cm}

Darbs iesniegts \@fakul\ fakultātē \@datums

Dekāna pilnvarotā persona: \@metod\ \mdots

\vspace{3cm}

Darbs aizstāvēts \@komis\ pār\-bau\-dī\-ju\-mu ko\-mi\-si\-jas sē\-dē

\@aizstdatums\  prot. Nr. \ldots

Komisijas sekretāre: \mdots\mdots\mdots
}


% ********  MODIFICATION OF COMMANDS, WHICH DEFINES SECTIONS  ********

\renewcommand{\section}{\@startsection {section}{1}{\z@}{3.5ex plus
   1ex minus .2ex}{2.3ex plus.2ex}{\reset@font\center\large\scshape}}
\renewcommand{\subsection}{\@startsection{subsection}{2}{\z@}{3.25ex
   plus 1ex minus .2ex}{1.5ex plus.2ex}{\reset@font\normalsize\bfseries}}
\renewcommand{\subsubsection}{\@startsection{subsubsection}{3}{\z@}{%
   3.25ex plus 1ex minus .2ex}{1.5ex plus.2ex}{\reset@font\normalsize\itshape}}
\renewcommand{\paragraph}{\@startsection
      {paragraph}{4}{\z@}{3.25ex plus 1ex minus.2ex}{-1em}{\reset@font
        \normalsize\bxsl}}
\renewcommand{\subparagraph}{\@startsection
        {subparagraph}{4}{\parindent}{3.25ex plus 1ex minus
        .2ex}{-1em}{\reset@font\normalsize\bxsl}}



% book, book part, conference proceedings
%---------------------------------------------------------------------

\newcommand{\gramata}[7]{#1%
\ifthenelse{\equal{#1}{}}{{\it #2}}{. {\it #2}}%
\ifthenelse{\equal{#2}{}}{\typein[\?]{Bakdarbs warning: You've missed
   a title in \protect\gramata.Press Enter to proceed.}}{}%
\ifthenelse{\equal{#3}{}}{}{, {\bf #3}}%
\ifthenelse{\equal{#4}{}}{, }{. #4, }#5%
\ifthenelse{\equal{#5}{}}{\typein[\?]{Bakdarbs warning: You've missed
   a year in \protect\gramata.Press Enter to proceed.}}{}%
\ifthenelse{\equal{#6}{}}{.}{, #6}%
\ifthenelse{\equal{#7}{}}{}{\,(#7).}}

% booklet, manual, Master's thesis, Phdthesis and others
%---------------------------------------------------------------------

\newcommand{\misc}[5]{#1%
\ifthenelse{\equal{#1}{}}{{\it #2}}{. {\it #2}}%
\ifthenelse{\equal{#2}{}}{\typein[\?]{Bakdarbs warning: You've missed
   a title in \protect\misc.Press Enter to proceed.}}{}%
\ifthenelse{\equal{#3}{}}{}{. #3}%
\ifthenelse{\equal{#4}{}}{.}{, #4.}%
\ifthenelse{\equal{#5}{}}{}{\,(#5).}}


% \renewcommand{\appendixname}{pielikums}

